import React, {PropsWithChildren} from 'react'
import QueryGoodsList from "../components/QueryGoodsList";
import MyNavigationBar from "../components/MyNavigationBar";
import "./goods.module.sass"
import FloatButton from "../components/FloatButton";
import {Add} from "@nutui/icons-react-taro";
import Taro from "@tarojs/taro";
import employeeStore from "../store/EmployeeStore";
export interface GoodsProps extends PropsWithChildren {

}

const Goods: React.FC<GoodsProps> = ({}) => {
    return <>
        <MyNavigationBar>货品</MyNavigationBar>
        <QueryGoodsList/>
        {employeeStore.hasAuthority("货品_新增")&&<FloatButton icon={<Add/>} onClick={async () => {
            await Taro.navigateTo({url: "/pages/goodsAdd"})
        }}/>}
    </>
}

export default Goods


